package com.tyl.service.impl;

import com.tyl.mapper.DepartmentMapper;
import com.tyl.pojo.Department;
import com.tyl.service.DepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class DepartmentServiceImpl implements DepartmentService {

    @Autowired
    private DepartmentMapper departmentMapper;
    @Override
    public List<Department> queryAllDepartmentList() {
        return departmentMapper.queryAllDepartmentList();
    }

    @Override
    public Department queryDepartmentById(int Id) {
        return departmentMapper.queryDepartmentById(Id);
    }

    @Override
    public int addDepartment(Department department) {
        return departmentMapper.addDepartment(department);
    }

    @Override
    public int deleteDepartment(int Id) {
        return departmentMapper.deleteDepartment(Id);
    }

    @Override
    public int updateDepartment(Department department) {
        return departmentMapper.updateDepartment(department);
    }
}
